home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 July & August
/
PCWorld_2007-07-08_cd.bin
/
v cisle
/
multiav
/
Multi_AV.exe
/
Sophos.kix
< prev
next >
Wrap
Text File
|
2007-05-09
|
4KB
|
131 lines
;
; 05-09-2007 // v2.00
;
SETCONSOLE("hide")
$ProcMode1=left($ProcMode,1)
SELECT
CASE $ProcMode1="R"
$MalwareProcMode=' -s -di -remove '
CASE $ProcMode1="D"
$MalwareProcMode=' '
ENDSELECT
$CMDline1='-dn -f -all -mime -mbr -noc -archive -opt=ISCabinet --stop-scan -p="ScanReport.txt"'
$CMDline=$MalwareProcMode+$CMDline1
$SafeMode="N"
$home="c:\AV-CLS\Sophos"
$procedurefile="c:\AV-CLS\killproc.txt"
$drive=left($home,2)
go $drive
md $home
md $home+"\temp"
cd $home
$WMICheck = ConfirmWMI()
If ($WMICheck="")=0
Dim $objWMIServ
$objWMIServ=GetObject("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL",48)
For Each $obj In $objWMIServ
$BootupState=$obj.BootupState
Next
$BootStat=$BootupState
$BootupState=left(ucase($BootupState),6)
if ($BootupState="NORMAL")=0 $SafeMode="Y" endif
Else
$BootStat="Undetermined"
$SafeMode="U"
EndIf
If ($SafeMode="Y")=1 and exist ("*.ide")=1 goto SCAN endif
If ($SafeMode="Y")=1 and exist ("*.ide")=0
BEEP
ShutDown ("","Sophos scanner files were not found. The computer is being shutdown so you can download the needed Sophos files in Normal Mode",30,1,1)
goto END
endif
gosub "GetFiles"
:SCAN
$result=messagebox ("Do you want to run the Sophos CLS now ? "," Sophos Command Line Scanner ",36,20)
SELECT
CASE ($result="6")=1
; YES
$result=messagebox ("Do you want to scan a particular folder or location ? "," Sophos Command Line Scanner ",36,20)
KillProcess()
SELECT
CASE ($result="6")=1
; YES
gosub "ScanFolder"
CASE ($result="7")=1
; NO
CleanCache()
gosub "ScanDefault"
ENDSELECT
CASE ($result="7")=1
; NO
goto END
CASE 1
; NO
goto END
ENDSELECT
:END
SETCONSOLE("hide")
exit
;---------------------------------------------------
:GetFiles
SETCONSOLE("SHOW")
SETCONSOLE("MAXIMIZE")
SETCONSOLE("FOREGROUND")
SETTITLE ("Sophos Module")
Color y+/b
cls
shell "c:\AV-CLS\wget -N http://www.sophos.com/tools/sav32sfx.exe"
cls
shell "c:\AV-CLS\wget -N http://www.sophos.com/downloads/ide/web_ides.exe"
cls
shell "c:\AV-CLS\wget -N http://www.sophos.com/tools/esdz.exe"
cls
SETCONSOLE("hide")
del "*.ide"
shell "c:\AV-CLS\unzip -j -oC esdz.exe sweep.exe"
if exist ($home+"\DOS4GW.EXE")=0
shell "c:\AV-CLS\unzip -j -oC esdz.exe DOS4GW.EXE"
endif
shell "c:\AV-CLS\unzip -j -o sav32sfx.exe"
shell "web_ides.exe -x"
return
;---------------------------------------------------
:ScanDefault
copy "SAV32CLI.EXE" "t.EXE"
SETCONSOLE("SHOW")
SETCONSOLE("MAXIMIZE")
SETCONSOLE("FOREGROUND")
SETTITLE ("Sophos Module")
Color y+/n
cls
shell "t.EXE c: d: "+$CMDline
SETCONSOLE("hide")
del "t.EXE"
if exist ("ScanReport.txt")=1 run "notepad ScanReport.txt" endif
return
;---------------------------------------------------
:ScanFolder
copy "SAV32CLI.EXE" "t.EXE"
$folder=GUIdialog()
if @error or (left($folder,2)="::")=1
$folder="C:"
endif
if (len($folder)=3)=1
$folder=left($folder,2)
endif
SETCONSOLE("SHOW")
SETCONSOLE("MAXIMIZE")
SETCONSOLE("FOREGROUND")
SETTITLE ("Sophos Module")
Color y+/n
cls
Color g+/n
AT (1,0) "Scanning... "+$folder
AT (3,0)
Color y+/n
shell 't.EXE "$folder" '+$CMDline
SETCONSOLE("hide")
del "t.EXE"
if exist ("ScanReport.txt")=1 run "notepad ScanReport.txt" endif
return